{{ $language := .Site.Language.Lang }}

<div class="ss-card -bg-opacity ss-project-card">
	<div class="header">
		<div class="header-first">
			<!-- {{ if isset .Params "icon" }}
				<img class="project-icon" src="{{ .Params.icon | relURL }}" />
			{{ end }} -->
			<h3 class="card-title">
				{{ $link := "" }}
				{{ if isset .Params "link" }}
					{{ if hasPrefix .Params.link "/" }}
						{{ $link = path.Join .RelPermalink .Params.link }}
					{{ else }}
						{{ $link = .Params.link }}
					{{ end }}
				{{ else }}
					{{ $link = path.Join .RelPermalink "/overview" }}
				{{ end }}
				{{ if isset .Params "icon" }}
					<img class="project-icon" style='{{ if eq .Params.gitee "" }} width:150px; {{end}}' src="{{ .Params.icon | relURL }}" />
				{{ else }} 
				  <a href={{ $link }}>
					{{ .Title }}
				</a>  
				{{ end }} 
			</h3>
		</div>
		<div class="gitstar">
		   {{ if eq  $language  "en" }}
			<a class="github-button" href={{ .Params.github }} data-icon="octicon-star" data-size="large"
				data-show-count="true">
			</a>
			{{ else }}
				{{ if ne .Params.gitee "" }}
				<a href="{{ .Params.gitee }}/stargazers" target="_blank" ><img src="{{ .Params.gitee }}/badge/star.svg?theme=gvp" /></a> 
				{{ end }}
			{{ end }} 
		</div>
	</div>
	<p class="card-content">
		{{ .Params.subDesc  }}
	</p>
	<div class="project-button-groups">
		<a class="project-button -shadow" href={{ $link }}>{{ .Params.startUp }}</a>
		<a class="project-button -outline" href={{ .Params.github }}>GitHub</a>
		{{ if ne .Params.gitee "" }}
		<a class="project-button -outline" href={{ .Params.gitee }}>Gitee</a>
		{{ else }}
		<a class="project-button" style="background-color: transparent;"></a>
		{{ end }}
	</div>
</div>